package testing.seperator;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import seperator.AWLSeperator;
import seperator.NounSeperator;
import words.AWL;
import words.Noun;


public class NounSeperatorTest {
	NounSeperator seperator;
	Noun noun;
	
	@Before
	public void setUp() throws Exception {
		this.seperator = new NounSeperator();
		
	}
	
	@Test
	public void test1()
	{
		String[] data = {"Tom","Cruise","advocates","the","power","of","the","city","."};
		seperator.setdata(data);
		seperator.seperate();
		noun = seperator.getResult();
		int result = noun.getArrayList().size();
		assertEquals(result,1);
	}
	@Test
	public void test2()
	{
		String[] data = {"Tom","cruise","advocates","the","power","of","the","city","."};
		seperator.setdata(data);
		seperator.seperate();
		noun = seperator.getResult();
		int result = noun.getArrayList().size();
		assertEquals(result,0);
	}
	@Test
	public void test3()
	{
		String[] data = {"Tom","Cruise","advocates","the","City","Power","."};
		seperator.setdata(data);
		seperator.seperate();
		noun = seperator.getResult();
		int result = noun.getArrayList().size();
		assertEquals(result,2);
	}
	@Test
	public void test4()
	{
		String[] data = {"Tom","cruise","advocates","the","city","Power","."};
		seperator.setdata(data);
		seperator.seperate();
		noun = seperator.getResult();
		int result = noun.getArrayList().size();
		assertEquals(result,0);
	}
	@Test
	public void test5()
	{
		String[] data = {"Tom","Cruise","advocates","the","Tom","Cruise","."};
		seperator.setdata(data);
		seperator.seperate();
		noun = seperator.getResult();
		int result = noun.getArrayList().size();
		assertEquals(result,1);
	}
}
